package ae.pcfc.etks.online.itworx.ehs.web.dao;

import java.util.Date;
import java.util.List;

import ae.pcfc.etks.online.itworx.ehs.web.entity.OFCRequest;
import ae.pcfc.etks.online.itworx.ehs.web.entity.OFCRequestHistory;
import ae.pcfc.etks.online.itworx.ehs.web.entity.Request;
import ae.pcfc.etks.online.itworx.ehs.web.enums.RequestField;
import ae.pcfc.etks.online.itworx.ehs.web.enums.RequestStatus;
import ae.pcfc.etks.online.itworx.ehs.web.enums.UserType;
import ae.pcfc.etks.online.itworx.ehs.web.model.RequestSearchCriteria;

public interface WorkflowDAO extends BaseDAO {

	List<Request> getAllRequests(String userId, String companyName,
			UserType user, Date creationDateFrom, Date creationDateTo,
			RequestStatus requestStatus,RequestField sortField,boolean ascending, int pageNo);
	
	List<OFCRequest> getAllRequestsByStatus(List<RequestStatus> requestsStatus);

	OFCRequest getRequestDetails(Long requestId);
	
	List<OFCRequestHistory> getRequestHistory(Long requestId);

	void createOFCRequest(OFCRequest ofcRequest);
	

	List<Request> getAllRequests(String userName,boolean isOfficer,RequestSearchCriteria Criteria);

	List<Request> getAllRequests(String userName,boolean isOfficer ,RequestSearchCriteria criteria,List<String> tasksUsers,boolean isAssigned);
	
	long getAllRequestsSize (String userName, boolean isOfficer, RequestSearchCriteria searchCriteria);
	
	long getAllActiveTasksSize (String userName, boolean isOfficer, RequestSearchCriteria searchCriteria,List<String> tasksUsers,boolean isAssigned);
	
	OFCRequest getRequestByIdAndUsername(long requestId, String username, List<String> tasksUsers, boolean isOfficer);
	
	void updateOFCRequest(OFCRequest ofcRequest);

	long getActiveRequestSize(String userName);
}
